home *** CD-ROM | disk | FTP | other *** search
- /* eyecandy.trx - 7/3/93 */
-
- /*
- ** This is a simple ARexx script to demonstrate
- ** primarily how to parse the DISPLAY option command for
- ** determining the size of Terminus display screen.
- */
-
- options failat 10
- options results
- signal on error
-
- 'cursorpos = off'
- 'palette = color'
-
- /* open a maximum sized display */
- 'display = ilace 16 color -1 -1'
-
- /* now get the actual size of the new display screen */
- 'display'
- parse var result lace colors temp rows cols
- colors = colors - 1
- rows = rows - 1
- cols = cols - 1
- 'cursor = off'
-
- /* 100,000 iterations should do it */
- do i = 0 to 100000
- tp = random(0,colors)
- bp = random(0,colors)
- r = random(1,rows)
- c = random(1,cols)
- x = random(33,125);
- 'move ' r ',' c
- 'tpen = ' tp
- 'bpen = ' bp
- if x = 34 then 'print local "\042";' /* escape the '"' character */
- else if x = 92 then 'print local "\134";' /* escape the '\' character */
- else if x = 94 then 'print local "\136";' /* escape the '^' character */
- else 'print local "'d2c(x)'";' /* send it */
- end
-
- exit
-
- error:
- 'print local "Error detected!"'
-